package com.lsc.www.day09.hm;

import java.util.Scanner;

public class h7 {
    public static void main(String[] args) {

        System.out.println("输入分段函数的值：");
        Scanner sc = new Scanner(System.in);
        double x = sc.nextDouble(); // 自变量

        if (x < 0) {
            System.out.println("2x+5");
        } else if (x >= 0 && x < 10) {
            System.out.println("x*x-x+3");
        } else if (x >= 10) {
            System.out.println("x*x*x-7x");
        }
    }
}

